package com.linln.devtools.generate.utils;

import java.util.Date;
import java.util.UUID;

public class IDWorker {

    /**
     * Base64缩短UUID到22位
     */
    static private char[] alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=".toCharArray();

    public static String GetID(){
        Date date = new Date();
        UUID uuid1 = UUID.randomUUID();
        return uuid1.toString().replaceAll("-","");
    }

    public static void main(String[] args) {
        String s = GetID();
        System.out.println("args = [" + s +","+s.length()+ "]");
    }
}
